-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate Markdown table of tools #473
Conversation
Thanks!
I'm okay with adding those as those are small enough information.
I'm okay with either. |
Great. Next two questions:
|
The current list is indeed long, so splitting it into separate files is okay.
I think the latter is better at this time because it eliminates the need for changes to the CI script. |
IIUC, the CI loops over each tool, in which case putting the markdown generation in the |
Oh, you are right. That is indeed inefficient and would be better to separate them. |
953952b
to
6b78595
Compare
@@ -0,0 +1,47 @@ | |||
# Tools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that the new table lost entries that are not managed by manifest from the previous, such as nextest, valgrind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've done a comparison now, and it is only nextest and valgrind from README.md that dont appear in TOOLS.md.
-
nextest is easy - we can create a base manifest for it, to get the bins at https://github.com/nextest-rs/nextest/releases/tag/cargo-nextest-0.9.70
-
That leaves
valgrind
, which is special as it isnt on GitHub.
Not too hard to have a special case for valgrind
.
But, I have also noticed that cargo-watch
& watchexec-cli
is in
install-action/tools/ci/tool-list.sh
Lines 135 to 138 in 689459d
latest) tools+=(cargo-watch watchexec-cli nextest) ;; | |
major.minor.patch) tools+=([email protected] [email protected] [email protected]) ;; | |
major.minor) tools+=([email protected] [email protected] [email protected]) ;; | |
major) tools+=(cargo-watch@8 watchexec-cli@1) ;; |
cargo-watch can also be a base manifest, getting bins from https://github.com/watchexec/cargo-watch/releases/tag/v8.5.2
watchexec-cli might be the bins at https://github.com/watchexec/watchexec/releases/tag/v2.1.1 - need to double check that one.
I see quite a few other system tools that are installed by https://github.com/taiki-e/install-action/blob/main/main.sh . Should we be mentioning them also? jq
, curl
, tar
also ?
They would be more special cases, which is fine.
- jq could be a manifest - see https://github.com/jqlang/jq/releases/tag/jq-1.7.1
- https://github.com/curl/curl/releases/tag/curl-8_7_1 doesnt contain binaries
- Maybe we could be replacing
tar
with https://github.com/vadorovsky/packy/releases/tag/v0.0.3 , if it released more arch binaries, and it uploaded untar'd bins to avoid chicken and egg problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But, I have also noticed that
cargo-watch
&watchexec-cli
is in
tools/ci/tool-list.sh is only for testing. tools/publish.sh is for "Supported tools".
install-action/tools/publish.sh
Lines 105 to 106 in 689459d
# Not manifest-based | |
tools+=(valgrind nextest cargo-nextest) |
I see quite a few other system tools that are installed by https://github.com/taiki-e/install-action/blob/main/main.sh . Should we be mentioning them also? jq, curl, tar also ?
Let's ignore them at this PR, as they are for incomplete runners and are not usually installed by us.
#[derive(Debug, Clone, PartialEq, Eq)] | ||
pub struct Version { | ||
pub major: Option<u64>, | ||
pub minor: Option<u64>, | ||
pub patch: Option<u64>, | ||
pub pre: semver::Prerelease, | ||
pub build: semver::BuildMetadata, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fwiw, git diff --color-moved
is a good way to check changes to the items which were moved to lib.rs.
Or if you like, I can create a separate PR to move them to lib.rs , but it still involves a lot of changes because pub
needed to be added to the struct members
@@ -561,6 +636,35 @@ fn download_github(url: &str) -> Result<ureq::Response> { | |||
Err(last_error.unwrap().into()) | |||
} | |||
|
|||
#[allow(clippy::missing_panics_doc)] | |||
pub fn github_head(url: &str) -> Result<()> { | |||
eprintln!("fetching head of {url} .."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this & the eprintln for failure is a bit noisy, especially as the license algorithm expects this to fail quite often as it tries to detect where to find the license file.
d83fcc1
to
d48fd77
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks @jayvdb!
Closes #440
This is still a bit of a mess, and the new logic is in the wrong spot - it is currently designed to easily update the existing manifests rather than supporting creating new manifests.
Key question atm is whether it is OK to add new fields
website
&license_markdown
to both the base info and manifest structs.Another is whether it is OK to create a
lib.rs
? I moved everything to thelib.rs
, but would be happy to move the unmodified parts back tomain.rs
to reduce the size of the change.